<%
String result = "{'success': true,";

int total = 320;
int start = Integer.parseInt(request.getParameter("start"));
int limit = Integer.parseInt(request.getParameter("limit"));
System.out.println("start:" + start + ", limit:" + limit);

result += "'total': " + total + ",'rows': [";
for(int i=start; i<(start+limit); i++){
	System.out.println("(start + i):" + i + ", total:" + total);
	if(i >= total) break;
	
	if(i != start) {
		result += ",";
	}
	result += "{";
	
	result += "'id': 'NO." + (i + 1) + "'";
    result += ",'name': 'ABigDreamer"+(i + 1)+"'";
    String sex = (i%2==0) ? "M": "F";
    result += ",'sex': '" + sex + "'";
    result += ",'age': '"+i%89+"'";
    result += ",'birthdate': 1344";
    
    result += "}";
}
result += "]}";

out.write(result);
%>
